package com.zhipu.balance.ui.home.record.adapter

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.blankj.utilcode.util.SPUtils
import com.blankj.utilcode.util.TimeUtils
import com.zhipu.balance.databinding.ItemRecordBinding
import com.zhipu.balance.mobile.dao.*
import com.zhipu.balance.mobile.event.*

class RecordAdapter  : RecyclerView.Adapter<RecordAdapter.ItemViewHolder>() {

    /**
     * 操作类别
     */
    private var stringDetectionName: String? = null
    fun setStringDetectionName(stringDetectionName: String?) {
        this.stringDetectionName = stringDetectionName
    }
    /**
     * 操作项
     */
    private var stringCategory: String? = null
    fun setStringCategory(stringCategory: String?) {
        this.stringCategory = stringCategory
    }


    /**
     * 稻谷
     */
    private lateinit var mRecordRiceList : List<RecordRice>
    fun setRecordRice(mRecordRice : List<RecordRice>){
        this.mRecordRiceList = mRecordRice
        notifyDataSetChanged()
    }

    /**
     * 小麦
     */
    private lateinit var mRecordWheatList : List<RecordWheat>
    fun setRecordWheat(mRecordWheat : List<RecordWheat>){
        this.mRecordWheatList = mRecordWheat
        notifyDataSetChanged()
    }

    /**
     * 记录玉米
     */
    private lateinit var mRecordCornList : List<RecordCorn>
    fun setRecordCorn(mRecordCornList : List<RecordCorn>){
        this.mRecordCornList = mRecordCornList
        notifyDataSetChanged()
    }
    /**
     * 记录大米
     */
    private lateinit var mRecordDaMiList : List<RecordDaMi>
    fun setRecordDaMi(mRecordDaMiList : List<RecordDaMi>){
        this.mRecordDaMiList = mRecordDaMiList
        notifyDataSetChanged()
    }
    /**
     * 记录大豆
     */
    private lateinit var mRecordSoybeanList : List<RecordSoybean>
    fun setRecordSoybean(mRecordSoybeanList : List<RecordSoybean>){
        this.mRecordSoybeanList = mRecordSoybeanList
        notifyDataSetChanged()
    }
    /**
     * 记录油菜籽
     */
    private lateinit var mRecordRapeseedList : List<RecordRapeseed>
    fun setRecordRapeseed(mRecordRapeseedList : List<RecordRapeseed>){
        this.mRecordRapeseedList = mRecordRapeseedList
        notifyDataSetChanged()
    }




    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemViewHolder {
        val binding = ItemRecordBinding.inflate(LayoutInflater.from(parent.context), parent, false)
        return ItemViewHolder(binding)
    }


    override fun onBindViewHolder(holder: ItemViewHolder, position: Int) {
        when(stringDetectionName){
            "稻谷" ->{
                var mRecordRice = mRecordRiceList[position]
                //选中
                holder.binding.CheckBox.isChecked = mRecordRice.select
                //序列号
                holder.binding.ID.text = mRecordRice.recordRiceId.toString()
                //编号
                holder.binding.uniqueId.text = mRecordRice.uniqueId
                //时间
                holder.binding.inspectionDate.text = TimeUtils.millis2String(mRecordRice.inspectionDate)
                when(stringCategory){
                    "杂质" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRice.impurityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRice.impurityRecorder
                        //
                        holder.binding.NameOne.text = mRecordRice.largeMiscellaneousSampleQuality.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRice.detailImpurity.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRice.detailResults.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordRice.smallMiscellaneousSampleQuality.toString()
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = mRecordRice.smallSampleImpurity.toString()
                        holder.binding.NameFive.visibility = View.VISIBLE
                        holder.binding.NameSix.text = mRecordRice.sampleResults.toString()
                        holder.binding.NameSix.visibility = View.VISIBLE
                        holder.binding.NameSeven.text = mRecordRice.impurityResults.toString()
                        holder.binding.NameSeven.visibility = View.VISIBLE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.VISIBLE
                        holder.binding.ViewSix.visibility = View.VISIBLE
                        holder.binding.ViewSeven.visibility = View.VISIBLE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "出糙" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRice.roughnessRateAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRice.rougheningRecorder
                        //
                        holder.binding.NameOne.text = mRecordRice.roughSampleQuality.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRice.brownRiceQuality.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRice.incompleteBrownRiceQuality.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordRice.rougheningResults.toString()
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "整精米" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRice.milledRiceAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRice.headRiceRecorder
                        //
                        holder.binding.NameOne.text = mRecordRice.qualityOfMilledRiceSample.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRice.headRiceQuality.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRice.headRiceResult.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "谷外糙米" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRice.ExternalValleyRoughnessAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRice.brownRiceRecorder
                        //
                        holder.binding.NameOne.text = mRecordRice.qualityOfBrownRiceSample.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRice.outsideBrownRiceQuality.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRice.brownRiceResult.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "黄粒米" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRice.YellowGrainRiceAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRice.yellowGrainRiceRecorder
                        //
                        holder.binding.NameOne.text = mRecordRice.yellowGrainRiceSampleQuality.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRice.yellowGrainRiceQuality.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRice.yellowGrainRiceResult.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "互混" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRice.intermixingAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRice.mixedGrainRecorder
                        //
                        holder.binding.NameOne.text = mRecordRice.massOfMixedSample.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRice.mixedGrainQuality.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRice.mixedGrainResult.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "出米率" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRice.RiceOutputAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRice.yieldRateRecorder
                        //
                        holder.binding.NameOne.text = mRecordRice.totalPaddyQuality.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRice.riceQuality.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRice.yieldRate.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                }
                holder.binding.Iten.setOnClickListener {
                    when(holder.binding.CheckBox.isChecked){
                        true ->{
                            mRecordRiceList[position].select = false
                        }
                        false ->{
                            mRecordRiceList[position].select = true
                        }
                    }
                    notifyDataSetChanged()
                }
            }
            "小麦" ->{
                var mRecordWheat = mRecordWheatList[position]
                //选中
                holder.binding.CheckBox.isChecked = mRecordWheat.select
                //序列号
                holder.binding.ID.text = mRecordWheat.recordWheatId.toString()
                //编号
                holder.binding.uniqueId.text = mRecordWheat.uniqueId
                //时间
                holder.binding.inspectionDate.text = TimeUtils.millis2String(mRecordWheat.inspectionDate)
                when(stringCategory){
                    "杂质" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordWheat.impurityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordWheat.impurityRecorder
                        //
                        holder.binding.NameOne.text = mRecordWheat.largeMiscellaneousSampleQuality.toString()
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordWheat.detailImpurity.toString()
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordWheat.detailResults.toString()
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordWheat.smallMiscellaneousSampleQuality.toString()
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = mRecordWheat.smallSampleImpurity.toString()
                        holder.binding.NameFive.visibility = View.VISIBLE
                        holder.binding.NameSix.text = mRecordWheat.sampleResults.toString()
                        holder.binding.NameSix.visibility = View.VISIBLE
                        holder.binding.NameSeven.text = mRecordWheat.mineralQuality.toString()
                        holder.binding.NameSeven.visibility = View.VISIBLE
                        holder.binding.NameEight.text = mRecordWheat.mineralContent.toString()
                        holder.binding.NameEight.visibility = View.VISIBLE
                        holder.binding.NameNine.text = mRecordWheat.impurityResults.toString()
                        holder.binding.NameNine.visibility = View.VISIBLE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.VISIBLE
                        holder.binding.ViewSix.visibility = View.VISIBLE
                        holder.binding.ViewSeven.visibility = View.VISIBLE
                        holder.binding.ViewEight.visibility = View.VISIBLE
                        holder.binding.ViewNine.visibility = View.VISIBLE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "不完善" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordWheat.imperfectGrainValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordWheat.imperfectGrainRecorder
                        if(SPUtils.getInstance().getBoolean("ImperfectSubdivision",false)){
                            //
                            holder.binding.NameOne.text = mRecordWheat.insectBoredQuality.toString()
                            holder.binding.NameOne.visibility = View.VISIBLE
                            holder.binding.NameTwo.text = mRecordWheat.insectBoredResult.toString()
                            holder.binding.NameTwo.visibility = View.VISIBLE
                            holder.binding.NameThree.text = mRecordWheat.mottledQuality.toString()
                            holder.binding.NameThree.visibility = View.VISIBLE
                            holder.binding.NameFour.text = mRecordWheat.mottledResult.toString()
                            holder.binding.NameFour.visibility = View.VISIBLE
                            holder.binding.NameFive.text = mRecordWheat.qualityOfFusariumGraminearumGrain.toString()
                            holder.binding.NameFive.visibility = View.VISIBLE
                            holder.binding.NameSix.text = mRecordWheat.scabGrainResults.toString()
                            holder.binding.NameSix.visibility = View.VISIBLE
                            holder.binding.NameSeven.text = mRecordWheat.brokenQuality.toString()
                            holder.binding.NameSeven.visibility = View.VISIBLE
                            holder.binding.NameEight.text = mRecordWheat.brokenResult.toString()
                            holder.binding.NameEight.visibility = View.VISIBLE
                            holder.binding.NameNine.text = mRecordWheat.sproutWeight.toString()
                            holder.binding.NameNine.visibility = View.VISIBLE
                            holder.binding.NameTen.text = mRecordWheat.sproutResult.toString()
                            holder.binding.NameTen.visibility = View.VISIBLE
                            holder.binding.NameEleven.text = mRecordWheat.moldWeight.toString()
                            holder.binding.NameEleven.visibility = View.VISIBLE
                            holder.binding.NameTwelve.text = mRecordWheat.moldResult.toString()
                            holder.binding.NameTwelve.visibility = View.VISIBLE
                            holder.binding.NameThirteen.text = mRecordWheat.thermalDamageGrainQuality.toString()
                            holder.binding.NameThirteen.visibility = View.VISIBLE
                            holder.binding.NameFourteen.text = mRecordWheat.thermalDamageGrain.toString()
                            holder.binding.NameFourteen.visibility = View.VISIBLE
                            holder.binding.NameFifteen.text = mRecordWheat.mildewGrainQuality.toString()
                            holder.binding.NameFifteen.visibility = View.VISIBLE
                            holder.binding.NameSixteen.text = mRecordWheat.mildewGrain.toString()
                            holder.binding.NameSixteen.visibility = View.VISIBLE
                            holder.binding.NameSeventeen.text = mRecordWheat.resultOfImperfectGrain.toString()
                            holder.binding.NameSeventeen.visibility = View.VISIBLE
                            //线
                            holder.binding.ViewOne.visibility = View.VISIBLE
                            holder.binding.ViewTwo.visibility = View.VISIBLE
                            holder.binding.ViewThree.visibility = View.VISIBLE
                            holder.binding.ViewFour.visibility = View.VISIBLE
                            holder.binding.ViewFive.visibility = View.VISIBLE
                            holder.binding.ViewSix.visibility = View.VISIBLE
                            holder.binding.ViewSeven.visibility = View.VISIBLE
                            holder.binding.ViewEight.visibility = View.VISIBLE
                            holder.binding.ViewNine.visibility = View.VISIBLE
                            holder.binding.ViewTen.visibility = View.VISIBLE
                            holder.binding.ViewEleven.visibility = View.VISIBLE
                            holder.binding.ViewTwelve.visibility = View.VISIBLE
                            holder.binding.ViewThirteen.visibility = View.VISIBLE
                            holder.binding.ViewFourteen.visibility = View.VISIBLE
                            holder.binding.ViewFifteen.visibility = View.VISIBLE
                            holder.binding.ViewSixteen.visibility = View.VISIBLE
                            holder.binding.ViewSeventeen.visibility = View.VISIBLE
                        }else{
                            //
                            holder.binding.NameOne.text = mRecordWheat.imperfectGrainQuality.toString()
                            holder.binding.NameOne.visibility = View.VISIBLE
                            holder.binding.NameTwo.text = mRecordWheat.resultOfImperfectGrain.toString()
                            holder.binding.NameTwo.visibility = View.VISIBLE
                            holder.binding.NameThree.text = ""
                            holder.binding.NameThree.visibility = View.GONE
                            holder.binding.NameFour.text = ""
                            holder.binding.NameFour.visibility = View.GONE
                            holder.binding.NameFive.text = ""
                            holder.binding.NameFive.visibility = View.GONE
                            holder.binding.NameSix.text = ""
                            holder.binding.NameSix.visibility = View.GONE
                            holder.binding.NameSeven.text = ""
                            holder.binding.NameSeven.visibility = View.GONE
                            holder.binding.NameEight.text = ""
                            holder.binding.NameEight.visibility = View.GONE
                            holder.binding.NameNine.text = ""
                            holder.binding.NameNine.visibility = View.GONE
                            holder.binding.NameTen.text = ""
                            holder.binding.NameTen.visibility = View.GONE
                            holder.binding.NameEleven.text = ""
                            holder.binding.NameEleven.visibility = View.GONE
                            holder.binding.NameTwelve.text = ""
                            holder.binding.NameTwelve.visibility = View.GONE
                            holder.binding.NameThirteen.text = ""
                            holder.binding.NameThirteen.visibility = View.GONE
                            holder.binding.NameFourteen.text = ""
                            holder.binding.NameFourteen.visibility = View.GONE
                            holder.binding.NameFifteen.text = ""
                            holder.binding.NameFifteen.visibility = View.GONE
                            holder.binding.NameSixteen.text = ""
                            holder.binding.NameSixteen.visibility = View.GONE
                            holder.binding.NameSeventeen.text = ""
                            holder.binding.NameSeventeen.visibility = View.GONE
                            //线
                            holder.binding.ViewOne.visibility = View.VISIBLE
                            holder.binding.ViewTwo.visibility = View.VISIBLE
                            holder.binding.ViewThree.visibility = View.GONE
                            holder.binding.ViewFour.visibility = View.GONE
                            holder.binding.ViewFive.visibility = View.GONE
                            holder.binding.ViewSix.visibility = View.GONE
                            holder.binding.ViewSeven.visibility = View.GONE
                            holder.binding.ViewEight.visibility = View.GONE
                            holder.binding.ViewNine.visibility = View.GONE
                            holder.binding.ViewTen.visibility = View.GONE
                            holder.binding.ViewEleven.visibility = View.GONE
                            holder.binding.ViewTwelve.visibility = View.GONE
                            holder.binding.ViewThirteen.visibility = View.GONE
                            holder.binding.ViewFourteen.visibility = View.GONE
                            holder.binding.ViewFifteen.visibility = View.GONE
                            holder.binding.ViewSixteen.visibility = View.GONE
                            holder.binding.ViewSeventeen.visibility = View.GONE
                        }
                    }
                    "面筋" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordWheat.glutenSampleValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordWheat.glutenRecorder
                        //
                        holder.binding.NameOne.text = mRecordWheat.glutenSampleQuality.toString()//"试样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordWheat.wetGlutenQuality.toString()//"湿面筋质量"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordWheat.wetGlutenResult.toString()//"湿面筋含量"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordWheat.dryGlutenQuality.toString()//"干面筋质量"
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = mRecordWheat.dryGlutenResult.toString()//"干面筋含量"
                        holder.binding.NameFive.visibility = View.VISIBLE
                        holder.binding.NameSix.text = mRecordWheat.glutenWaterAbsorptionResults.toString()//"面筋吸水率结果"
                        holder.binding.NameSix.visibility = View.VISIBLE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.VISIBLE
                        holder.binding.ViewSix.visibility = View.VISIBLE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "容重" -> {
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordWheat.densityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordWheat.densityRecorder
                        //
                        holder.binding.NameOne.text = mRecordWheat.densityQuality.toString()//容重质量
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordWheat.densityResult.toString()//容重结果
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = ""
                        holder.binding.NameThree.visibility = View.GONE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.GONE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                }
                holder.binding.Iten.setOnClickListener {
                    when(holder.binding.CheckBox.isChecked){
                        true ->{
                            mRecordWheatList[position].select = false
                        }
                        false ->{
                            mRecordWheatList[position].select = true
                        }
                    }
                    notifyDataSetChanged()
                }
            }
            "玉米" ->{
                var mRecordCorn = mRecordCornList[position]
                //选中
                holder.binding.CheckBox.isChecked = mRecordCorn.select
                //序列号
                holder.binding.ID.text = mRecordCorn.recordCornId.toString()
                //编号
                holder.binding.uniqueId.text = mRecordCorn.uniqueId
                //时间
                holder.binding.inspectionDate.text = TimeUtils.millis2String(mRecordCorn.inspectionDate)
                when(stringCategory){
                    "杂质" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordCorn.impurityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordCorn.impurityRecorder
                        //
                        holder.binding.NameOne.text = mRecordCorn.largeMiscellaneousSampleQuality.toString()//"大样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordCorn.detailImpurity.toString()//"大样杂质"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordCorn.detailResults.toString()//"大样杂质率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordCorn.smallMiscellaneousSampleQuality.toString()//"小样质量"
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = mRecordCorn.smallSampleImpurity.toString()//"小样杂质"
                        holder.binding.NameFive.visibility = View.VISIBLE
                        holder.binding.NameSix.text = mRecordCorn.sampleResults.toString()//"小样杂质率"
                        holder.binding.NameSix.visibility = View.VISIBLE
                        holder.binding.NameSeven.text = mRecordCorn.impurityResults.toString()//"总杂质率"
                        holder.binding.NameSeven.visibility = View.VISIBLE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.VISIBLE
                        holder.binding.ViewSix.visibility = View.VISIBLE
                        holder.binding.ViewSeven.visibility = View.VISIBLE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "不完善" ->{
                        if(SPUtils.getInstance().getBoolean("ImperfectSubdivision",false)){
                            //平均值
                            holder.binding.AverageValue.text = if(mRecordCorn.imperfectGrainValue) "已计算" else "未计算"
                            //记录员
                            holder.binding.recorder.text = mRecordCorn.imperfectGrainRecorder
                            //
                            holder.binding.NameOne.text = mRecordCorn.insectBoredQuality.toString()//虫蚀粒质量
                            holder.binding.NameOne.visibility = View.VISIBLE
                            holder.binding.NameTwo.text = mRecordCorn.insectBoredResult.toString()//虫蚀率-结果
                            holder.binding.NameTwo.visibility = View.VISIBLE
                            holder.binding.NameThree.text = mRecordCorn.mottledQuality.toString()//病斑粒质量
                            holder.binding.NameThree.visibility = View.VISIBLE
                            holder.binding.NameFour.text = mRecordCorn.mottledResult.toString()//病斑率-结果
                            holder.binding.NameFour.visibility = View.VISIBLE
                            holder.binding.NameFive.text = mRecordCorn.brokenQuality.toString()//破损粒质量
                            holder.binding.NameFive.visibility = View.VISIBLE
                            holder.binding.NameSix.text = mRecordCorn.brokenResult.toString()//破损率-结果
                            holder.binding.NameSix.visibility = View.VISIBLE
                            holder.binding.NameSeven.text = mRecordCorn.sproutWeight.toString()//生芽粒重量
                            holder.binding.NameSeven.visibility = View.VISIBLE
                            holder.binding.NameEight.text = mRecordCorn.sproutResult.toString()//生芽粒率-结果
                            holder.binding.NameEight.visibility = View.VISIBLE
                            holder.binding.NameNine.text = mRecordCorn.moldWeight.toString()//生霉粒重量
                            holder.binding.NameNine.visibility = View.VISIBLE
                            holder.binding.NameTen.text = mRecordCorn.moldResult.toString()//生霉粒率-结果
                            holder.binding.NameTen.visibility = View.VISIBLE
                            holder.binding.NameEleven.text = mRecordCorn.thermalDamageGrainQuality.toString()//"热损伤粒质量"
                            holder.binding.NameEleven.visibility = View.VISIBLE
                            holder.binding.NameTwelve.text = mRecordCorn.thermalDamageGrain.toString()//"热损伤粒"
                            holder.binding.NameTwelve.visibility = View.VISIBLE
                            holder.binding.NameThirteen.text = mRecordCorn.mildewGrainQuality.toString()//"赤霉病粒质量"
                            holder.binding.NameThirteen.visibility = View.VISIBLE
                            holder.binding.NameFourteen.text = mRecordCorn.mildewGrain.toString()//"赤霉病粒率"
                            holder.binding.NameFourteen.visibility = View.VISIBLE
                            holder.binding.NameFifteen.text = mRecordCorn.resultOfImperfectGrain.toString()//不完善粒率
                            holder.binding.NameFifteen.visibility = View.VISIBLE
                            holder.binding.NameSixteen.text = ""
                            holder.binding.NameSixteen.visibility = View.GONE
                            holder.binding.NameSeventeen.text = ""
                            holder.binding.NameSeventeen.visibility = View.GONE
                            //线
                            holder.binding.ViewOne.visibility = View.VISIBLE
                            holder.binding.ViewTwo.visibility = View.VISIBLE
                            holder.binding.ViewThree.visibility = View.VISIBLE
                            holder.binding.ViewFour.visibility = View.VISIBLE
                            holder.binding.ViewFive.visibility = View.VISIBLE
                            holder.binding.ViewSix.visibility = View.VISIBLE
                            holder.binding.ViewSeven.visibility = View.VISIBLE
                            holder.binding.ViewEight.visibility = View.VISIBLE
                            holder.binding.ViewNine.visibility = View.VISIBLE
                            holder.binding.ViewTen.visibility = View.VISIBLE
                            holder.binding.ViewEleven.visibility = View.VISIBLE
                            holder.binding.ViewTwelve.visibility = View.VISIBLE
                            holder.binding.ViewThirteen.visibility = View.VISIBLE
                            holder.binding.ViewFourteen.visibility = View.VISIBLE
                            holder.binding.ViewFifteen.visibility = View.VISIBLE
                            holder.binding.ViewSixteen.visibility = View.GONE
                            holder.binding.ViewSeventeen.visibility = View.GONE
                        }else{
                            //平均值
                            holder.binding.AverageValue.text = if(mRecordCorn.imperfectGrainValue) "已计算" else "未计算"
                            //记录员
                            holder.binding.recorder.text = mRecordCorn.imperfectGrainRecorder
                            //
                            holder.binding.NameOne.text = mRecordCorn.imperfectGrainQuality.toString()//"不完善粒"
                            holder.binding.NameOne.visibility = View.VISIBLE
                            holder.binding.NameTwo.text = mRecordCorn.resultOfImperfectGrain.toString()//"不完善粒率"
                            holder.binding.NameTwo.visibility = View.VISIBLE
                            holder.binding.NameThree.text = ""
                            holder.binding.NameThree.visibility = View.GONE
                            holder.binding.NameFour.text = ""
                            holder.binding.NameFour.visibility = View.GONE
                            holder.binding.NameFive.text = ""
                            holder.binding.NameFive.visibility = View.GONE
                            holder.binding.NameSix.text = ""
                            holder.binding.NameSix.visibility = View.GONE
                            holder.binding.NameSeven.text = ""
                            holder.binding.NameSeven.visibility = View.GONE
                            holder.binding.NameEight.text = ""
                            holder.binding.NameEight.visibility = View.GONE
                            holder.binding.NameNine.text = ""
                            holder.binding.NameNine.visibility = View.GONE
                            holder.binding.NameTen.text = ""
                            holder.binding.NameTen.visibility = View.GONE
                            holder.binding.NameEleven.text = ""
                            holder.binding.NameEleven.visibility = View.GONE
                            holder.binding.NameTwelve.text = ""
                            holder.binding.NameTwelve.visibility = View.GONE
                            holder.binding.NameThirteen.text = ""
                            holder.binding.NameThirteen.visibility = View.GONE
                            holder.binding.NameFourteen.text = ""
                            holder.binding.NameFourteen.visibility = View.GONE
                            holder.binding.NameFifteen.text = ""
                            holder.binding.NameFifteen.visibility = View.GONE
                            holder.binding.NameSixteen.text = ""
                            holder.binding.NameSixteen.visibility = View.GONE
                            holder.binding.NameSeventeen.text = ""
                            holder.binding.NameSeventeen.visibility = View.GONE
                            //线
                            holder.binding.ViewOne.visibility = View.VISIBLE
                            holder.binding.ViewTwo.visibility = View.VISIBLE
                            holder.binding.ViewThree.visibility = View.GONE
                            holder.binding.ViewFour.visibility = View.GONE
                            holder.binding.ViewFive.visibility = View.GONE
                            holder.binding.ViewSix.visibility = View.GONE
                            holder.binding.ViewSeven.visibility = View.GONE
                            holder.binding.ViewEight.visibility = View.GONE
                            holder.binding.ViewNine.visibility = View.GONE
                            holder.binding.ViewTen.visibility = View.GONE
                            holder.binding.ViewEleven.visibility = View.GONE
                            holder.binding.ViewTwelve.visibility = View.GONE
                            holder.binding.ViewThirteen.visibility = View.GONE
                            holder.binding.ViewFourteen.visibility = View.GONE
                            holder.binding.ViewFifteen.visibility = View.GONE
                            holder.binding.ViewSixteen.visibility = View.GONE
                            holder.binding.ViewSeventeen.visibility = View.GONE
                        }
                    }
                    "容重" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordCorn.densityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordCorn.densityRecorder
                        //
                        holder.binding.NameOne.text = mRecordCorn.densityQuality.toString()//容重-质量
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordCorn.densityResult.toString()//容重-结果
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = ""
                        holder.binding.NameThree.visibility = View.GONE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.GONE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                }
                holder.binding.Iten.setOnClickListener {
                    when(holder.binding.CheckBox.isChecked){
                        true ->{
                            mRecordCornList[position].select = false
                        }
                        false ->{
                            mRecordCornList[position].select = true
                        }
                    }
                    notifyDataSetChanged()
                }
            }
            "大米" ->{
                var mRecordDaMi = mRecordDaMiList[position]
                //选中
                holder.binding.CheckBox.isChecked = mRecordDaMi.select
                //序列号
                holder.binding.ID.text = mRecordDaMi.recordDaMiId.toString()
                //编号
                holder.binding.uniqueId.text = mRecordDaMi.uniqueId
                //时间
                holder.binding.inspectionDate.text = TimeUtils.millis2String(mRecordDaMi.inspectionDate)
                when(stringCategory){
                    "杂质" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordDaMi.impurityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordDaMi.impurityRecorder
                        //
                        holder.binding.NameOne.text = mRecordDaMi.riceSampleQuality.toString()//"试样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordDaMi.riceImpurity.toString()//"大米杂质"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordDaMi.impurityResults.toString()//"杂质率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "不完善" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordDaMi.imperfectGrainValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordDaMi.imperfectGrainRecorder
                        if(SPUtils.getInstance().getBoolean("ImperfectSubdivision",false)){
//
                            holder.binding.NameOne.text = mRecordDaMi.qualityOfImperfectGrainSample.toString()//"试样质量"
                            holder.binding.NameOne.visibility = View.VISIBLE
                            holder.binding.NameTwo.text = mRecordDaMi.resultOfImperfectGrain.toString()//"不完善粒率"
                            holder.binding.NameTwo.visibility = View.VISIBLE
                            holder.binding.NameThree.text = mRecordDaMi.immatureBrokenGrainQuality.toString()//未熟粒重量
                            holder.binding.NameThree.visibility = View.VISIBLE
                            holder.binding.NameFour.text = mRecordDaMi.immatureGrainResult.toString()//未熟粒率-结果
                            holder.binding.NameFour.visibility = View.VISIBLE
                            holder.binding.NameFive.text = mRecordDaMi.insectBoredQuality.toString()//虫蚀粒质量
                            holder.binding.NameFive.visibility = View.VISIBLE
                            holder.binding.NameSix.text = mRecordDaMi.insectBoredResult.toString()//虫蚀率-结果
                            holder.binding.NameSix.visibility = View.VISIBLE
                            holder.binding.NameSeven.text = mRecordDaMi.mottledQuality.toString()//病斑粒质量
                            holder.binding.NameSeven.visibility = View.VISIBLE
                            holder.binding.NameEight.text = mRecordDaMi.mottledResult.toString()//病斑率-结果
                            holder.binding.NameEight.visibility = View.VISIBLE
                            holder.binding.NameNine.text = mRecordDaMi.moldWeight.toString()//生霉粒重量
                            holder.binding.NameNine.visibility = View.VISIBLE
                            holder.binding.NameTen.text = mRecordDaMi.moldResult.toString()// 生霉粒率-结果
                            holder.binding.NameTen.visibility = View.VISIBLE
                            holder.binding.NameEleven.text = mRecordDaMi.incompleteBrownRiceQuality.toString()//糙米粒重量
                            holder.binding.NameEleven.visibility = View.VISIBLE
                            holder.binding.NameTwelve.text = mRecordDaMi.rougheningResults.toString()//糙米粒率-结果+
                            holder.binding.NameTwelve.visibility = View.VISIBLE
                            holder.binding.NameThirteen.text = ""
                            holder.binding.NameThirteen.visibility = View.GONE
                            holder.binding.NameFourteen.text = ""
                            holder.binding.NameFourteen.visibility = View.GONE
                            holder.binding.NameFifteen.text = ""
                            holder.binding.NameFifteen.visibility = View.GONE
                            holder.binding.NameSixteen.text = ""
                            holder.binding.NameSixteen.visibility = View.GONE
                            holder.binding.NameSeventeen.text = ""
                            holder.binding.NameSeventeen.visibility = View.GONE
                            //线
                            holder.binding.ViewOne.visibility = View.VISIBLE
                            holder.binding.ViewTwo.visibility = View.VISIBLE
                            holder.binding.ViewThree.visibility = View.VISIBLE
                            holder.binding.ViewFour.visibility = View.VISIBLE
                            holder.binding.ViewFive.visibility = View.VISIBLE
                            holder.binding.ViewSix.visibility = View.VISIBLE
                            holder.binding.ViewSeven.visibility = View.VISIBLE
                            holder.binding.ViewEight.visibility = View.VISIBLE
                            holder.binding.ViewNine.visibility = View.VISIBLE
                            holder.binding.ViewTen.visibility = View.VISIBLE
                            holder.binding.ViewEleven.visibility = View.VISIBLE
                            holder.binding.ViewTwelve.visibility = View.VISIBLE
                            holder.binding.ViewThirteen.visibility = View.GONE
                            holder.binding.ViewFourteen.visibility = View.GONE
                            holder.binding.ViewFifteen.visibility = View.GONE
                            holder.binding.ViewSixteen.visibility = View.GONE
                            holder.binding.ViewSeventeen.visibility = View.GONE
                        }else{
                            //
                            holder.binding.NameOne.text = mRecordDaMi.qualityOfImperfectGrainSample.toString()//"试样质量"
                            holder.binding.NameOne.visibility = View.VISIBLE
                            holder.binding.NameTwo.text = mRecordDaMi.imperfectGrainQuality.toString()//"不完善粒率"
                            holder.binding.NameTwo.visibility = View.VISIBLE
                            holder.binding.NameThree.text = mRecordDaMi.resultOfImperfectGrain.toString()//"不完善粒率"
                            holder.binding.NameThree.visibility = View.VISIBLE
                            holder.binding.NameFour.text = ""
                            holder.binding.NameFour.visibility = View.GONE
                            holder.binding.NameFive.text = ""
                            holder.binding.NameFive.visibility = View.GONE
                            holder.binding.NameSix.text = ""
                            holder.binding.NameSix.visibility = View.GONE
                            holder.binding.NameSeven.text = ""
                            holder.binding.NameSeven.visibility = View.GONE
                            holder.binding.NameEight.text = ""
                            holder.binding.NameEight.visibility = View.GONE
                            holder.binding.NameNine.text = ""
                            holder.binding.NameNine.visibility = View.GONE
                            holder.binding.NameTen.text = ""
                            holder.binding.NameTen.visibility = View.GONE
                            holder.binding.NameEleven.text = ""
                            holder.binding.NameEleven.visibility = View.GONE
                            holder.binding.NameTwelve.text = ""
                            holder.binding.NameTwelve.visibility = View.GONE
                            holder.binding.NameThirteen.text = ""
                            holder.binding.NameThirteen.visibility = View.GONE
                            holder.binding.NameFourteen.text = ""
                            holder.binding.NameFourteen.visibility = View.GONE
                            holder.binding.NameFifteen.text = ""
                            holder.binding.NameFifteen.visibility = View.GONE
                            holder.binding.NameSixteen.text = ""
                            holder.binding.NameSixteen.visibility = View.GONE
                            holder.binding.NameSeventeen.text = ""
                            holder.binding.NameSeventeen.visibility = View.GONE
                            //线
                            holder.binding.ViewOne.visibility = View.VISIBLE
                            holder.binding.ViewTwo.visibility = View.VISIBLE
                            holder.binding.ViewThree.visibility = View.VISIBLE
                            holder.binding.ViewFour.visibility = View.GONE
                            holder.binding.ViewFive.visibility = View.GONE
                            holder.binding.ViewSix.visibility = View.GONE
                            holder.binding.ViewSeven.visibility = View.GONE
                            holder.binding.ViewEight.visibility = View.GONE
                            holder.binding.ViewNine.visibility = View.GONE
                            holder.binding.ViewTen.visibility = View.GONE
                            holder.binding.ViewEleven.visibility = View.GONE
                            holder.binding.ViewTwelve.visibility = View.GONE
                            holder.binding.ViewThirteen.visibility = View.GONE
                            holder.binding.ViewFourteen.visibility = View.GONE
                            holder.binding.ViewFifteen.visibility = View.GONE
                            holder.binding.ViewSixteen.visibility = View.GONE
                            holder.binding.ViewSeventeen.visibility = View.GONE
                        }

                    }
                    "碎米率" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordDaMi.qualityOfBrokenValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordDaMi.brokenRiceRecorder
                        //
                        holder.binding.NameOne.text = mRecordDaMi.qualityOfBrokenRiceSample.toString()//"试样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordDaMi.brokenRiceQuality.toString()//"碎米质量"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordDaMi.totalBrokenRice.toString()//"碎米率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordDaMi.smallBrokenRiceQuality.toString()//"小碎米质量"
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = mRecordDaMi.smallBrokenRice.toString()//"小碎米率"
                        holder.binding.NameFive.visibility = View.VISIBLE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.VISIBLE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "黄粒米" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordDaMi.yellowGrainRiceSampleValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordDaMi.yellowGrainRiceRecorder
                        //
                        holder.binding.NameOne.text = mRecordDaMi.yellowGrainRiceSampleQuality.toString()//"试样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordDaMi.yellowGrainRiceQuality.toString()//"黄粒米质量"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordDaMi.yellowGrainRiceResult.toString()//"黄粒米率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "互混" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordDaMi.massOfMixedSampleValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordDaMi.mixedGrainRecorder
                        //
                        holder.binding.NameOne.text = mRecordDaMi.massOfMixedSample.toString()//"试样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordDaMi.mixedGrainQuality.toString()//"异种粮质量"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordDaMi.mixedGrainResult.toString()//"互混率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                }
                holder.binding.Iten.setOnClickListener {
                    when(holder.binding.CheckBox.isChecked){
                        true ->{
                            mRecordDaMiList[position].select = false
                        }
                        false ->{
                            mRecordDaMiList[position].select = true
                        }
                    }
                    notifyDataSetChanged()
                }
            }
            "大豆" ->{
                var mRecordSoybean = mRecordSoybeanList[position]
                //选中
                holder.binding.CheckBox.isChecked = mRecordSoybean.select
                //序列号
                holder.binding.ID.text = mRecordSoybean.recordSoybeanId.toString()
                //编号
                holder.binding.uniqueId.text = mRecordSoybean.uniqueId
                //时间
                holder.binding.inspectionDate.text = TimeUtils.millis2String(mRecordSoybean.inspectionDate)
                when(stringCategory){
                    "杂质" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordSoybean.impurityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordSoybean.impurityRecorder
                        //
                        holder.binding.NameOne.text = mRecordSoybean.largeMiscellaneousSampleQuality.toString()//"大样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordSoybean.detailImpurity.toString()//"大样杂质"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordSoybean.detailResults.toString()//"大样杂质率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordSoybean.smallMiscellaneousSampleQuality.toString()//"小样质量"
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = mRecordSoybean.smallSampleImpurity.toString()//"小样杂质"
                        holder.binding.NameFive.visibility = View.VISIBLE
                        holder.binding.NameSix.text = mRecordSoybean.sampleResults.toString()//"小样杂质率"
                        holder.binding.NameSix.visibility = View.VISIBLE
                        holder.binding.NameSeven.text = mRecordSoybean.impurityResults.toString()//"总杂质率"
                        holder.binding.NameSeven.visibility = View.VISIBLE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.VISIBLE
                        holder.binding.ViewSix.visibility = View.VISIBLE
                        holder.binding.ViewSeven.visibility = View.VISIBLE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "损伤粒率" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordSoybean.damagedGrainValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordSoybean.damagedGrainRecorder
                        //
                        holder.binding.NameOne.text = mRecordSoybean.damagedGrainQuality.toString()//"损伤粒(含热损伤粒)质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordSoybean.damagedGrainResult.toString()//"损伤粒率"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = ""
                        holder.binding.NameThree.visibility = View.GONE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.GONE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "热损伤粒率" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordSoybean.thermalDamageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordSoybean.thermalDamageGrainRecorder
                        //
                        holder.binding.NameOne.text = mRecordSoybean.thermalDamageGrainQuality.toString()//"热损伤粒质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordSoybean.thermalDamageGrain.toString()//"热损伤粒率"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = ""
                        holder.binding.NameThree.visibility = View.GONE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.GONE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "完整粒率" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordSoybean.immatureBrokenGrainValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordSoybean.wholeGrainRecorder
                        //
                        holder.binding.NameOne.text = mRecordSoybean.immatureBrokenGrainQuality.toString()//"未熟粒质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordSoybean.wholeGrainRate.toString()//"完整粒率"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = ""
                        holder.binding.NameThree.visibility = View.GONE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.GONE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                }
                holder.binding.Iten.setOnClickListener {
                    when(holder.binding.CheckBox.isChecked){
                        true ->{
                            mRecordSoybeanList[position].select = false
                        }
                        false ->{
                            mRecordSoybeanList[position].select = true
                        }
                    }
                    notifyDataSetChanged()
                }
            }
            "油菜籽" ->{
                var mRecordRapeseed = mRecordRapeseedList[position]
                //选中
                holder.binding.CheckBox.isChecked = mRecordRapeseed.select
                //序列号
                holder.binding.ID.text = mRecordRapeseed.recordRapeseedId.toString()
                //编号
                holder.binding.uniqueId.text = mRecordRapeseed.uniqueId
                //时间
                holder.binding.inspectionDate.text = TimeUtils.millis2String(mRecordRapeseed.inspectionDate)
                when(stringCategory){
                    "杂质" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRapeseed.impurityAverageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRapeseed.impurityRecorder
                        //
                        holder.binding.NameOne.text = mRecordRapeseed.largeMiscellaneousSampleQuality.toString()//"大样质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRapeseed.detailImpurity.toString()//"大样杂质"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRapeseed.detailResults.toString()//"大样杂质率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = mRecordRapeseed.smallMiscellaneousSampleQuality.toString()//"小样质量"
                        holder.binding.NameFour.visibility = View.VISIBLE
                        holder.binding.NameFive.text = mRecordRapeseed.smallSampleImpurity.toString()//"小样杂质"
                        holder.binding.NameFive.visibility = View.VISIBLE
                        holder.binding.NameSix.text = mRecordRapeseed.sampleResults.toString()//"小样杂质率"
                        holder.binding.NameSix.visibility = View.VISIBLE
                        holder.binding.NameSeven.text = mRecordRapeseed.impurityResults.toString()//"总杂质率"
                        holder.binding.NameSeven.visibility = View.VISIBLE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.VISIBLE
                        holder.binding.ViewFive.visibility = View.VISIBLE
                        holder.binding.ViewSix.visibility = View.VISIBLE
                        holder.binding.ViewSeven.visibility = View.VISIBLE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "生芽粒" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRapeseed.sproutWeightValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRapeseed.sproutRecorder
                        //
                        holder.binding.NameOne.text = mRecordRapeseed.sproutWeight.toString()//"生芽粒质量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRapeseed.sproutResult.toString()//"生芽粒率"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = ""
                        holder.binding.NameThree.visibility = View.GONE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.GONE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "生霉粒" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRapeseed.moldWeightValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRapeseed.moldRecorder
                        //
                        holder.binding.NameOne.text = mRecordRapeseed.moldWeight.toString()//"生霉粒重量"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRapeseed.moldResult.toString()//"生霉粒率"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = ""
                        holder.binding.NameThree.visibility = View.GONE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.GONE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "热损伤粒" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRapeseed.thermalDamageValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRapeseed.thermalDamageNumberRecorder
                        //
                        holder.binding.NameOne.text = mRecordRapeseed.thermalDamageNumber1.toString()//"第一次"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRapeseed.thermalDamageNumber2.toString()// "第二次"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRapeseed.thermalDamageGrain.toString()//"热损伤粒"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                    "未熟粒" ->{
                        //平均值
                        holder.binding.AverageValue.text = if(mRecordRapeseed.immatureGrainValue) "已计算" else "未计算"
                        //记录员
                        holder.binding.recorder.text = mRecordRapeseed.immatureGrainNumberRecorder
                        //
                        holder.binding.NameOne.text = mRecordRapeseed.immatureGrainNumber1.toString()//"第一次"
                        holder.binding.NameOne.visibility = View.VISIBLE
                        holder.binding.NameTwo.text = mRecordRapeseed.immatureGrainNumber2.toString()//"第二次"
                        holder.binding.NameTwo.visibility = View.VISIBLE
                        holder.binding.NameThree.text = mRecordRapeseed.immatureGrainResult.toString()//"未熟粒率"
                        holder.binding.NameThree.visibility = View.VISIBLE
                        holder.binding.NameFour.text = ""
                        holder.binding.NameFour.visibility = View.GONE
                        holder.binding.NameFive.text = ""
                        holder.binding.NameFive.visibility = View.GONE
                        holder.binding.NameSix.text = ""
                        holder.binding.NameSix.visibility = View.GONE
                        holder.binding.NameSeven.text = ""
                        holder.binding.NameSeven.visibility = View.GONE
                        holder.binding.NameEight.text = ""
                        holder.binding.NameEight.visibility = View.GONE
                        holder.binding.NameNine.text = ""
                        holder.binding.NameNine.visibility = View.GONE
                        holder.binding.NameTen.text = ""
                        holder.binding.NameTen.visibility = View.GONE
                        holder.binding.NameEleven.text = ""
                        holder.binding.NameEleven.visibility = View.GONE
                        holder.binding.NameTwelve.text = ""
                        holder.binding.NameTwelve.visibility = View.GONE
                        holder.binding.NameThirteen.text = ""
                        holder.binding.NameThirteen.visibility = View.GONE
                        holder.binding.NameFourteen.text = ""
                        holder.binding.NameFourteen.visibility = View.GONE
                        holder.binding.NameFifteen.text = ""
                        holder.binding.NameFifteen.visibility = View.GONE
                        holder.binding.NameSixteen.text = ""
                        holder.binding.NameSixteen.visibility = View.GONE
                        holder.binding.NameSeventeen.text = ""
                        holder.binding.NameSeventeen.visibility = View.GONE
                        //线
                        holder.binding.ViewOne.visibility = View.VISIBLE
                        holder.binding.ViewTwo.visibility = View.VISIBLE
                        holder.binding.ViewThree.visibility = View.VISIBLE
                        holder.binding.ViewFour.visibility = View.GONE
                        holder.binding.ViewFive.visibility = View.GONE
                        holder.binding.ViewSix.visibility = View.GONE
                        holder.binding.ViewSeven.visibility = View.GONE
                        holder.binding.ViewEight.visibility = View.GONE
                        holder.binding.ViewNine.visibility = View.GONE
                        holder.binding.ViewTen.visibility = View.GONE
                        holder.binding.ViewEleven.visibility = View.GONE
                        holder.binding.ViewTwelve.visibility = View.GONE
                        holder.binding.ViewThirteen.visibility = View.GONE
                        holder.binding.ViewFourteen.visibility = View.GONE
                        holder.binding.ViewFifteen.visibility = View.GONE
                        holder.binding.ViewSixteen.visibility = View.GONE
                        holder.binding.ViewSeventeen.visibility = View.GONE
                    }
                }
                holder.binding.Iten.setOnClickListener {
                    when(holder.binding.CheckBox.isChecked){
                        true ->{
                            mRecordRapeseedList[position].select = false
                        }
                        false ->{
                            mRecordRapeseedList[position].select = true
                        }
                    }
                    notifyDataSetChanged()
                }
            }
        }
    }

    override fun getItemCount(): Int {
        when(stringDetectionName){
            "稻谷" ->{
                return mRecordRiceList.size
            }
            "小麦" ->{
                return mRecordWheatList.size
            }
            "玉米" ->{
                return mRecordCornList.size
            }
            "大米" ->{
                return mRecordDaMiList.size
            }
            "大豆" ->{
                return mRecordSoybeanList.size
            }
            "油菜籽" ->{
                return mRecordRapeseedList.size
            }
        }
        return 0
    }



    class ItemViewHolder(var binding: ItemRecordBinding) : RecyclerView.ViewHolder(binding.root) {

    }
}